package guilib;

/***
 * @author Ragnvald Fuglestein
 */

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JTextField;

import baseStructure.Base;

public abstract class EditorDialog extends JDialog {
	private static final long serialVersionUID = 1987147211215559737L;
	protected JLabel namelabel = new JLabel("Name");
	protected JTextField namefield;

	protected JButton okbutton;
	protected JButton cancelbutton;
	
	public EditorDialog(Base base) {
		add(namelabel);
		namefield.setText(base.getName());
		add(namefield);
		
		okbutton.setName("OK");
		okbutton.setActionCommand("ok");

		cancelbutton.setName("Cancel");
		cancelbutton.setActionCommand("cancel");
	}
}
